package com.jk.controller;

import ch.qos.logback.core.net.SyslogOutputStream;

import com.jk.entity.Product;
import com.jk.service.PopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.prefs.Preferences;

@RestController
public class PopController {

    @Autowired
    private PopService popService;

    @RequestMapping("getPop")
    public List<Product> getPop(){
        List<Product> pop = popService.getPop();
        System.out.println("-----------------"+pop);
        return  pop;

    }

}




